#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>

typedef char value_t;

typedef struct 
{
	value_t* data;
	int capacity;
	int n;
	int* parent;
	int* size;
}QuickUnionSet;

typedef struct _node
{
	struct _node* next;
	int index;
}Node;


QuickUnionSet* createQuickUnion(int capacity);


void initQuickUnion(QuickUnionSet* findSet, value_t* data, int n);

int isSameQuickUnion(QuickUnionSet* set, value_t a, value_t b);
void unionQuickUnion(QuickUnionSet* set, value_t a, value_t b);

void releaseQuickUnion(QuickUnionSet* findSet);
